import axios from 'axios'
import axiosServer from "@/utils/request.js";
/***
 * 购物车数据接口
 */
 
  export const cartIndex=()=>{
    return  axiosServer({
        method:'get',
        url:'/cart/index'
      })
}

/**
 * 商品详情
 */

/**
 * 品牌详情
 *   get -> params
 *   post -> data
 * @returns 
 */
 export const brandDetail = (id)=>{
  return axiosServer({
      method:'get',
      url:'/brand/detail',
      params:{
        id,
      }
  })
}
/**
 * 商品详情
 */

 export const productDetail = (id)=>{
 return axiosServer ({
   method:'get',
   url:'/goods/detail',
   params:{
     id,
   }
})
}
/**获取购物车数量 */
export const CartNum =()=>{
  return axiosServer({
     method:'get',
     url:'/cart/goodscount',
  })
}
/*选中状态的改变 */
export const PChangeProductChecked = (data)=>{
  return axiosServer ({
    method:'post',
    url:'/baseurl/cart/checked',
    data,
 })
 }